<template>
	<view>
		<view class="productList">
			<view class="productList_item" v-for="item in bestSellerList || shopList" :key="item.id" @tap="navigatorProductsDetail(item.id)">
				<image :src="item.pic" mode=""></image>
				<view class="productList_info">
					<view class="info_tit">
						{{item.name}}
					</view>
					
					<view class="info_other">
						<text>￥{{item.price || 'null' }}元</text>
						<text>乐居</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"ProductList",
		data() {
			return {
				
			};
		},
		props:['bestSellerList','shopList'],
		methods:{
			navigatorProductsDetail(id){
				this.$emit('detail',id)
			}
		}
		
	}
</script>

<style lang="scss" scoped>
     .productList {
     	display: flex;
     	flex-wrap: wrap;
     	justify-content: space-between;
     
     	.productList_item {
     		width: 324rpx;
     		margin: 10px 0;
     		background-color: #fff;
     		border-radius: 4px;
     
     		image {
     			width: 100%;
     			height: 238rpx;
     		}
     
     		.productList_info {
     			padding: 36rpx;
     			font-size: 26rpx;
     
     			.info_tit {
     				color: #3e3e3e;
     				line-height: 19px;
     				margin-top: 4px;
     				font-weight: 700;
     				text-overflow: ellipsis;
     				overflow: hidden;
     				white-space: nowrap;
     			}
     			
     			.info_other{
     			   display: flex;
     			   justify-content: space-between;
     			   margin-top: 10px
     			}
     		}
     	}
     }
</style>